package model

import (
	"gorm.io/gorm"
	"time"
)

type TestManagement struct {
	Id                   uint64         `gorm:"column:id;type:int UNSIGNED;primaryKey;not null;" json:"id"`
	TestQuestionType     string         `gorm:"column:test_question_type;type:varchar(3);comment:试题类型;default:NULL;" json:"test_question_type"`            // 试题类型
	Difficulty           string         `gorm:"column:difficulty;type:varchar(3);comment:难度;default:NULL;" json:"difficulty"`                              // 难度
	ProfessionalScopeOne string         `gorm:"column:professional_scope_one;type:varchar(3);comment:专业范围一级;default:NULL;" json:"professional_scope_one"`  // 专业范围一级
	ProfessionalScopeTwo string         `gorm:"column:professional_scope_two;type:varchar(10);comment:专业范围二级;default:NULL;" json:"professional_scope_two"` // 专业范围二级
	Author               string         `gorm:"column:author;type:varchar(30);comment:作者;default:NULL;" json:"author"`                                     // 作者
	TestQuestions        string         `gorm:"column:test_questions;type:varchar(255);comment:试题题目;default:NULL;" json:"test_questions"`                  // 试题题目
	CreatedAt            time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt            time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt            gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (t *TestManagement) TableName() string {
	return "test_management"
}
